package com.campus.shop.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.campus.shop.controller.web.vo.GoodsCartVo;
import com.campus.shop.controller.web.vo.GoodsDetailVo;
import com.campus.shop.controller.web.vo.GoodsListVo;
import com.campus.shop.entity.Goods;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 *
 * @author xr
 * @since 2023-12-360 14:22:52
 */
@Mapper
@Repository
public interface GoodsMapper extends BaseMapper<Goods> {
    List<GoodsListVo> getPageList(@Param("limit") Integer limit,@Param("offset") Integer offset,@Param("cateId") Integer cateId,@Param("goodsName") String goodsName);

    Integer getPageTotal(@Param("cateId") Integer cateId,@Param("goodsName") String goodsName);

    GoodsDetailVo findGoodById(Integer goodsId);


    GoodsCartVo getGoodsInfo(Integer goodsId);
}
